/* /////////////////////////////////////////////////////////////////////////////
//
//                  INTEL CORPORATION PROPRIETARY INFORMATION
//     This software is supplied under the terms of a license agreement or
//     nondisclosure agreement with Intel Corporation and may not be copied
//     or disclosed except in accordance with the terms of that agreement.
//          Copyright(c) 2004-2007 Intel Corporation. All Rights Reserved.
//
//
//          VC-1 (VC1) decoder, Interlace MV tables
//
*/
#include "umc_defs.h"

#if defined (UMC_ENABLE_VC1_VIDEO_DECODER) || defined (UMC_ENABLE_VC1_SPLITTER) || defined (UMC_ENABLE_VC1_VIDEO_ENCODER)

#include "umc_vc1_common_defs.h"
#include "umc_vc1_common_interlace_mv_tables.h"

//VC-1 Table 133:  2-Field reference interlace MV table 0
// Index    VLC    VLC     Index   VLC     VLC  Index  VLC    VLC
//        Codeword Size          Codeword Size       Codeword Size
//    0      12     4        42    207     10    84    977     11
//    1      28     5        43    1395    12    85    408     11
//    2      11     5        44    9        5    86    489     11
//    3      0      5        45    35       7    87    1309    12
//    4      14     6        46    237      8    88    180     12
//    5      42     7        47    24       7    89    63      8
//    6      80     8        48    6        7    90    1109    12
//    7      872   10        49    68       8    91    555     11
//    8      2      2        50    245      9    92    553     11
//    9      26     5        51    121      9    93    1105    12
//    10     4      5        52    1746    11    94    1400    12
//    11     58     6        53    110      7    95    1970    12
//    12     29     6        54    43       9    96    1392    12
//    13     108    7        55    349     10    97    341     13
//    14     239    8        56    23       9    98    50      8
//    15     444    9        57    895     10    99    976     12
//    16     351   10        58    324     10   100    84      11
//    17     15     4        59    206     10   101    1747    11
//    18     3      5        60    40      10   102    1393    12
//    19     28     6        61    171     12   103    1108    12
//    20     13     6        62    16       6   104    820     12
//    21     11     7        63    437      9   105    7153    13
//    22     62     8        64    247      9   106    183     12
//    23     167    9        65    166      9   107    41      9
//    24     326   10        66    123      9   108    7812    14
//    25     409   11        67    40       9   109    364     13
//    26     6      4        68    493     10   110    411     11
//    27     31     6        69    489     10   111    7152    13
//    28     4      6        70    1789    11   112    1401    12
//    29     60     7        71    4        7   113    3907    13
//    30     7      7        72    245     10   114    181     12
//    31     446    9        73    41      10   115    2209    13
//    32     139    9        74    650     11   116    42      9
//    33     44    10        75    651     11   117    365     13
//    34     1971  12        76    655     11   118    2208    13
//    35     5      5        77    3577    12   119    1952    12
//    36     219    8        78    821     12   120    977     12
//    37     86     8        79    7813    14   121    2789    13
//    38     236    8        80    238      8   122    340     13
//    39     82     8        81    701     11   123    2788    13
//    40     445    9        82    43      10   124    2617    13
//    41     120    9        83    984     11   125    2616    13

//VC1_Field2ReferenceInterlaceMVTable0[]
const extern Ipp32s VC1_InterlacedMVDifTable0[] =
{
    14, /* max bits */
    2,  /* total subtables */
    7, 7,/* subtable sizes */

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        2,0x010009,
    0, /* 3-bit codes */
    3, /* 4-bit codes */
        12,0x000101,      15,0x020012,       6, 0x03001B,
    8, /* 5-bit codes */
        28,0x000202,      11,0x000303,       0, 0x000404,
        26,0x01010A,      4, 0x01020B,       3, 0x020113,
        5, 0x040024,      9, 0x05002D,
    8, /* 6-bit codes */
        14,0x000505,      58,0x01030C,       29,0x01040D,
        28,0x020214,      13,0x020315,       31,0x03011C,
        4, 0x03021D,      16,0x07003F,
    10, /* 7-bit codes */
        42, 0x000606,     108,0x01050E,      11, 0x020416,
        60, 0x03031E,     7,  0x03041F,      35, 0x05012E,
        24, 0x050330,     6,  0x050431,      110,0x060036,
        4,  0x080048,
     12, /* 8-bit codes */
        80, 0x000707,     239,0x01060F,      62, 0x020517,
        219,0x040125,     86, 0x040226,      236,0x040327,
        82, 0x040428,     237,0x05022F,      68, 0x050532,
        238,0x090051,     63, 0x0A005A,      50, 0x0B0063,
    17, /* 9-bit codes */
        444,0x010710,     167,0x020618,      446,0x030520,
        139,0x030621,     445,0x040529,      120,0x04062A,
        245,0x050633,     121,0x050734,      43, 0x060137,
        23, 0x060339,     437,0x070140,      247,0x070241,
        166,0x070342,     123,0x070443,      40, 0x070544,
        41, 0x0C006C,     42, 0x0D0075,
    15, /* 10-bit codes */
        872,0x000808,     351,0x010811,     326,0x020719,
        44, 0x030722,     207,0x04072B,     349,0x060238,
        895,0x06043A,     324,0x06053B,     206,0x06063C,
        40, 0x06073D,     493,0x070645,     489,0x070746,
        245,0x080149,     41, 0x08024A,     43, 0x090253,
    16, /* 11-bit codes */
       409, 0x02081A,     1746,0x050835,     1789,0x070847,
       650, 0x08034B,     651, 0x08044C,     655, 0x08054D,
       701, 0x090152,     984, 0x090354,     977, 0x090455,
       408, 0x090556,     489, 0x090657,     555, 0x0A025C,
       553, 0x0A035D,     84,  0x0B0265,     1747,0x0B0366,
       411, 0x0C036F,
    21, /* 12-bit codes */
       1971,0x030823,     1395,0x04082C,     171, 0x06083E,
       3577,0x08064E,     821, 0x08074F,     1309,0x090758,
       180, 0x090859,     1109,0x0A015B,     1105,0x0A045E,
       1400,0x0A055F,     1970,0x0A0660,     1392,0x0A0761,
       976, 0x0B0164,     1393,0x0B0467,     1108,0x0B0568,
       820, 0x0B0669,     183, 0x0B086B,     1401,0x0C0571,
       181, 0x0C0773,     1952,0x0D0378,     977, 0x0D0479,
    13, /* 13-bit codes */
        341, 0x0A0862,    7153,0x0B076A,     364, 0x0C026E,
        7152,0x0C0470,    3907,0x0C0672,     2209,0x0C0874,
        365, 0x0D0176,    2208,0x0D0277,     2789,0x0D057A,
        340, 0x0D067B,    2788,0x0D077C,     2617,0x0D087D,
        2616,0x0E007E,
    2, /* 14-bit codes */
        7813,0x080850,    7812,0x0C016D,
-1 /* end of table */
};

//VC-1 Table 134:  2-Field reference interlace MV table 1
// Index  VLC      VLC     Index    VLC      VLC    Index    VLC        VLC
//       Codeword  Size            Codeword  Size           Codeword    Size
//    0      3     3        42     7408      13        84      827       10
//    1      9     4        43     2881      13        85      697       10
//    2     22     5        44     50         6        86      1771      11
//    3     16     6        45     230        8        87      1392      11
//    4    215     8        46     224        8        88      3620      12
//    5    821    10        47     207        8        89      925       10
//    6   1396    11        48     171        8        90      1442      12
//    7   1365    11        49     412        9        91      1443      12
//    8      0     2        50     683       10        92      3709      12
//    9     29     5        51     3627      12        93      1518      11
//    10     9     5        52     5593      13        94      1849      11
//    11    23     6        53     111        7        95      1364      11
//    12    44     7        54     451        9        96      2725      12
//    13   173     8        55     175        8        97      2724      12
//    14   884    10        56     191        8        98      887       10
//    15  1715    11        57     172        8        99      7413      13
//    16  1399    11        58     381        9        100     3022      12
//    17    15     4        59     1763      11        101     3705      12
//    18    24     5        60     3625      12        102     1632      11
//    19    10     5        61     6532      13        103     1652      11
//    20    46     6        62     84         7        104     1770      11
//    21    34     7        63     181        9        105     3708      12
//    22   380     9        64     378        9        106     3429      12
//    23  3707    12        65     429        9        107     758       10
//    24  7049    13        66     409        9        108     5594      13
//    25  5592    13        67     376        9        109     7048      13
//    26     8     4        68     856       10        110     1441      12
//    27    52     6        69     722       11        111     7412      13
//    28   109     7        70     7243      13        112     1510      11
//    29    35     7        71     91         8        113     3624      12
//    30   450     9        72     680       10        114     1397      11
//    31   886    10        73     817       10        115     3428      12
//    32   723    11        74     904       10        116     820       10
//    33  7242    13        75     907       10        117     13067     14
//    34 13066    14        76     880       10        118     5595      13
//    35    20     5        77     1811      11        119     2880      13
//    36   106     7        78     3267      12        120     3023      12
//    37   114     7        79     7409      13        121     3525      12
//    38   108     7        80     441        9        122     3626      12
//    39   227     8        81     1519      11        123     1653      11
//    40   411     9        82     1848      11        124     1393      11
//    41  1855    11        83     754       10        125     1363      11

//VC1_Field2ReferenceInterlaceMVTable1[]
const extern Ipp32s VC1_InterlacedMVDifTable1[] =
{
    14, /* max bits */
    2,  /* total subtables */
    7,7,

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        0,   0x010009,
    1, /* 3-bit codes */
        3,   0x000101,
    3, /* 4-bit codes */
        9,   0x000202,      15,  0x020012,       8,   0x03001B,
    6, /* 5-bit codes */
        22,  0x000303,      29,  0x01010A,       9,   0x01020B,
        24,  0x020113,      10,  0x020214,       20,  0x040024,
    5, /* 6-bit codes */
        16,  0x000404,      23,  0x01030C,       46,  0x020315,
        52,  0x03011C,      50,  0x05002D,
    9, /* 7-bit codes */
        44,  0x01040D,      34,  0x020416,       109, 0x03021D,
        35,  0x03031E,      106, 0x040125,       114, 0x040226,
        108, 0x040327,      111, 0x060036,       84,  0x07003F,
    11, /* 8-bit codes */
        215, 0x000505,      173, 0x01050E,       227, 0x040428,
        230, 0x05012E,      224, 0x05022F,       207, 0x050330,
        171, 0x050431,      175, 0x060238,       191, 0x060339,
        172, 0x06043A,      91,  0x080048,
    12, /* 9-bit codes */
        380, 0x020517,      450, 0x03041F,       411, 0x040529,
        412, 0x050532,      451, 0x060137,       381, 0x06053B,
        181, 0x070140,      378, 0x070241,       429, 0x070342,
        409, 0x070443,      376, 0x070544,       441, 0x090051,
    17, /* 10-bit codes */
        821, 0x000606,      884, 0x01060F,       886, 0x030520,
        683, 0x050633,      856, 0x070645,       680, 0x080149,
        817, 0x08024A,      904, 0x08034B,       907, 0x08044C,
        880, 0x08054D,      754, 0x090354,       827, 0x090455,
        697, 0x090556,      925, 0x0A005A,       887, 0x0B0063,
        758, 0x0C006C,      820, 0x0D0075,
    24, /* 11-bit codes */
        1396, 0x000707,     1365, 0x000808,      1715, 0x010710,
        1399, 0x010811,     723,  0x030621,      1855, 0x04062A,
        1763, 0x06063C,     722,  0x070746,      1811, 0x08064E,
        1519, 0x090152,     1848, 0x090253,      1771, 0x090657,
        1392, 0x090758,     1518, 0x0A045E,      1849, 0x0A055F,
        1364, 0x0A0660,     1632, 0x0B0467,      1652, 0x0B0568,
        1770, 0x0B0669,     1510, 0x0C0571,      1397, 0x0C0773,
        1653, 0x0D077C,     1393, 0x0D087D,      1363, 0x0E007E,
    20, /* 12-bit codes */
        3707, 0x020618,     3627, 0x050734,      3625, 0x06073D,
        3267, 0x08074F,     3620, 0x090859,      1442, 0x0A015B,
        1443, 0x0A025C,     3709, 0x0A035D,      2725, 0x0A0761,
        2724, 0x0A0862,     3022, 0x0B0265,      3705, 0x0B0366,
        3708, 0x0B076A,     3429, 0x0B086B,      1441, 0x0C036F,
        3624, 0x0C0672,     3428, 0x0C0874,      3023, 0x0D0479,
        3525, 0x0D057A,     3626, 0x0D067B,
    15, /* 13-bit codes */
        7049, 0x020719,     5592, 0x02081A,      7242, 0x030722,
        7408, 0x04072B,     2881, 0x04082C,      5593, 0x050835,
        6532, 0x06083E,     7243, 0x070847,      7409, 0x080850,
        7413, 0x0B0164,     5594, 0x0C016D,      7048, 0x0C026E,
        7412, 0x0C0470,     5595, 0x0D0277,      2880, 0x0D0378,
    2, /* 14-bit codes */
        13066, 0x030823,    13067, 0x0D0176,

    -1 /* end of table */
};


//VC-1 Table 135:  2-Field reference interlace MV table 2
// Index   VLC      VLC      Index    VLC       VLC  Index    VLC       VLC
//        Codeword  Size            Codeword    Size        Codeword    Size
//    0     4        4        42        244      10   84        4       10
//    1     2        4        43        1764     12   85        440     10
//    2    16        5        44        1         5   86        192     9
//    3     3        5        45        60        8   87        634     10
//    4    23        6        46        125       8   88        785     11
//    5    69        7        47        141       8   89        156     8
//    6    62        8        48        157       8   90        1569    12
//    7   126        9        49        49        8   91        409     11
//    8     3        2        50        110       9   92        796     11
//    9     2        5        51        662      10   93        247     10
//    10   40        6        52        205      10   94        995     11
//    11   30        6        53        37        6   95        854     11
//    12   21        6        54        329       9   96        393     10
//    13   71        7        55        50        8   97        5       10
//    14    2        7        56        137       8   98        107     8
//    15  333        9        57        54        8   99        2242    12
//    16   96        9        58        136       8  100        816     12
//    17   11        4        59        111       9  101        1279    11
//    18   38        6        60        3         9  102        1264    11
//    19   36        6        61        797      11  103        849     11
//    20   20        6        62        14        6  104        1266    11
//    21   50        7        63        426      10  105        498     10
//    22  111        8        64        638      10  106        883     11
//    23  195        9        65        97        9  107        0       8
//    24 1329       11        66        334       9  108        3137    13
//    25 1765       12        67        335       9  109        2243    12
//    26   21        5        68        103       9  110        2540    12
//    27   63        7        69        255      10  111        994     11
//    28   45        7        70        387      10  112        772     11
//    29    1        7        71        54        7  113        1271    11
//    30  318        9        72        855      11  114        1265    11
//    31  221        9        73        245      10  115        496     10
//    32  246       10        74        198       9  116        328     9
//    33  773       11        75        194       9  117        3136    13
//    34  817       12        76        665      10  118        2541    12
//    35   14        5        77        281       9  119        2240    12
//    36    3        7        78        561      10  120        2241    12
//    37   52        7        79        848      11  121        1267    11
//    38   51        7        80        44        7  122        1278    11
//    39   26        7        81        399      10  123        254     10
//    40  330        9        82        1328     11  124        499     10
//    41  197        9        83        663      10  125        425     10

//const extern Ipp32s VC1_Field2ReferenceInterlaceMVTable2[]
const extern Ipp32s VC1_InterlacedMVDifTable2[] =
{
    13, /* max bits */
    2,  /* total subtables */
    6, 7,

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        3, 0x010009,
    0, /* 3-bit codes */
    3, /* 4-bit codes */
        4, 0x000101,        2, 0x000202,        11,0x020012,
    6, /* 5-bit codes */
        16,0x000303,        3, 0x000404,        2, 0x01010A,
        21,0x03001B,        14,0x040024,        1, 0x05002D,
    9, /* 6-bit codes */
        23,0x000505,        40,0x01020B,        30,0x01030C,
        21,0x01040D,        38,0x020113,        36,0x020214,
        20,0x020315,        37,0x060036,        14,0x07003F,
    13, /* 7-bit codes */
        69, 0x000606,       71, 0x01050E,       2,  0x01060F,
        50, 0x020416,       63, 0x03011C,       45, 0x03021D,
        1,  0x03031E,        3,  0x040125,      52, 0x040226,
        51, 0x040327,       26, 0x040428,       54, 0x080048,
        44, 0x090051,
    14, /* 8-bit codes */
        62,  0x000707,      111, 0x020517,      60,  0x05012E,
        125, 0x05022F,      141, 0x050330,      157, 0x050431,
        49,  0x050532,       50, 0x060238 ,     137, 0x060339,
        54,  0x06043A,      136, 0x06053B,      156, 0x0A005A,
        107, 0x0B0063,        0, 0x0C006C,
    21, /* 9-bit codes */
        126, 0x000808,        333, 0x010710,        96,  0x010811,
        195, 0x020618,        318, 0x03041F,        221, 0x030520,
        330, 0x040529,        197, 0x04062A,        110, 0x050633,
        329, 0x060137,        111, 0x06063C,        3,   0x06073D,
        97,  0x070342,        334, 0x070443,        335, 0x070544,
        103, 0x070645,        198, 0x08034B,        194, 0x08044C,
        281, 0x08064E,        192, 0x090657,        328, 0x0D0075,
    24, /* 10-bit codes */
        246, 0x030621,        244, 0x04072B,        662, 0x050734,
        205, 0x050835,        426, 0x070140,        638, 0x070241,
        255, 0x070746,        387, 0x070847,        245, 0x08024A,
        665, 0x08054D,        561, 0x08074F,        399, 0x090152,
        663, 0x090354,        4,   0x090455,        440, 0x090556,
        634, 0x090758,        247, 0x0A045E,        393, 0x0A0761,
        5,   0x0A0862,        498, 0x0B076A,        496, 0x0C0874,
        254, 0x0D077C,        499, 0x0D087D,        425, 0x0E007E,
    22, /* 11-bit codes */
        1329, 0x020719,        773,  0x030722,        797,  0x06083E,
        855,  0x080149,        848,  0x080850,        1328, 0x090253,
        785,  0x090859,        409,  0x0A025C,        796,  0x0A035D,
        995,  0x0A055F,        854,  0x0A0660,        1279, 0x0B0366,
        1264, 0x0B0467,        849,  0x0B0568,        1266, 0x0B0669,
        883,  0x0B086B,        994,  0x0C0470,        772,  0x0C0571,
        1271, 0x0C0672,        1265, 0x0C0773,        1267, 0x0D057A,
        1278, 0x0D067B,
    11, /* 12-bit codes */
        1765, 0x02081A,        817,  0x030823,        1764, 0x04082C,
        1569, 0x0A015B,        2242, 0x0B0164,        816,  0x0B0265,
        2243, 0x0C026E,        2540, 0x0C036F,        2541, 0x0D0277,
        2240, 0x0D0378,        2241, 0x0D0479,
    2, /* 13-bit codes */
        3137, 0x0C016D,        3136, 0x0D0176,

-1 /* end of table */
};

//VC-1 Table 136:  2-Field reference interlace MV table 3
// Index   VLC      VLC      Index    VLC       VLC   Index    VLC        VLC
//        Codeword  Size            Codeword    Size         Codeword    Size
//    0     0        3        42        16462    15    84     2580        12
//    1     4        4        43        5175     13    85     699         11
//    2    47        6        44        43        6    86     401         11
//    3    82        7        45        133       8    87     2127        12
//    4    16        7        46        167       8    88     5176        13
//    5    173       9        47        160       8    89     175          9
//    6   1291      11        48        332       9    90     2967        12
//    7    400      11        49        666      10    91     1155        13
//    8      3       2        50        812      12    92     5179        13
//    9     22       5        51        8499     14    93     811         12
//    10     7       5        52        5162     13    94     579         12
//    11    13       6        53        81        7    95     5163        13
//    12    187      8        54        644      10    96     2392        14
//    13    371      9        55        172       9    97     10687       14
//    14    201     10        56        258       9    98     73           9
//    15   1295     11        57        69        9    99     2668        12
//    16   5932     13        58        68        9   100     5339        13
//    17      3      3        59        2075     12   101     1197        13
//    18     17      5        60        1630     13   102     5342        13
//    19      5      5        61        3255     14   103     2126        12
//    20     67      7        62        24        7   104     5172        13
//    21     35      8        63        1292     11   105     599         12
//    22     75      9        64        530      10   106     11866       14
//    23    814     12        65        740      10   107     519         10
//    24  11867     14        66        515      10   108     5173        13
//    25   1154     13        67        148      10   109     5177        13
//    26      9      4        68        290      11   110     3254        14
//    27     42      6        69        2074     12   111     5178        13
//    28     20      6        70        1621     13   112     404         11
//    29     42      7        71        51        8   113     1620        13
//    30    264      9        72        698      11   114     8501        14
//    31   1482     11        73        582      12   115     21372       15
//    32   1626     13        74        578      12   116     348         10
//    33   8502     14        75        2670     12   117     576         12
//    34   8498     14        76        1036     11   118     4114        13
//    35     11      5        77        2056     12   119     21373       15
//    36     19      7        78        8500     14   120     2393        14
//    37     65      7        79        16463    15   121     4248        13
//    38    184      8        80        373       9   122     5174        13
//    39    372      9        81        1029     11   123     1631        13
//    40    256      9        82        583      12   124     8230        14
//    41   5338     13        83        298      11   125     8503        14

//const extern Ipp32s VC1_Field2ReferenceInterlaceMVTable3[] =
const extern Ipp32s VC1_InterlacedMVDifTable3[] =
{
    15, /* max bits */
    3,  /* total subtables */
    5,5,5,

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        3, 0x010009,
    2, /* 3-bit codes */
        0, 0x000101,        3, 0x020012,
    2, /* 4-bit codes */
        4, 0x000202,        9, 0x03001B,
    5, /* 5-bit codes */
        22, 0x01010A,       7,  0x01020B,        17, 0x020113,
        5,  0x020214,       11, 0x040024,
    5, /* 6-bit codes */
        47, 0x000303,        13, 0x01030C,        42, 0x03011C,
        20, 0x03021D,        43, 0x05002D,
    8, /* 7-bit codes */
        82, 0x000404,        16, 0x000505,        67, 0x020315,
        42, 0x03031E,        19, 0x040125,        65, 0x040226,
        81, 0x060036,        24, 0x07003F,
    7, /* 8-bit codes */
        187, 0x01040D,        35,  0x020416,        184, 0x040327,
        133, 0x05012E,        167, 0x05022F,        160, 0x050330,
        51,  0x080048,
    14, /* 9-bit codes */
        173, 0x000606,        371, 0x01050E,        75,  0x020517,
        264, 0x03041F,        372, 0x040428,        256, 0x040529,
        332, 0x050431,        172, 0x060238,        258, 0x060339,
        69,  0x06043A,        68,  0x06053B,        373, 0x090051,
        175, 0x0A005A,        73,  0x0B0063,
    9, /* 10-bit codes */
        201, 0x01060F,        666, 0x050532,        644, 0x060137,
        530, 0x070241,        740, 0x070342,        515, 0x070443,
        148, 0x070544,        519, 0x0C006C,        348, 0x0D0075,
    13, /* 11-bit codes */
        1291, 0x000707,        400,  0x000808,        1295, 0x010710,
        1482, 0x030520,        1292, 0x070140,        290,  0x070645,
        698,  0x080149,        1036, 0x08054D,        1029, 0x090152,
        298,  0x090354,        699,  0x090556,        401,  0x090657,
        404,  0x0C0571,
    18, /* 12-bit codes */
        814,  0x020618,        812,  0x050633,        2075, 0x06063C,
        2074, 0x070746,        582,  0x08024A,        578,  0x08034B,
        2670, 0x08044C,        2056, 0x08064E,        583,  0x090253,
        2580, 0x090455,        2127, 0x090758,        2967, 0x0A015B,
        811,  0x0A045E,        579,  0x0A055F,        2668, 0x0B0164,
        2126, 0x0B0568,        599,  0x0B076A,        576,  0x0D0176,
    24, /* 13-bit codes */
        5932, 0x010811,        1154, 0x02081A,        1626, 0x030621,
        5338, 0x04062A,        5175, 0x04082C,        5162, 0x050835,
        1630, 0x06073D,        1621, 0x070847,        5176, 0x090859,
        1155, 0x0A025C,        5179, 0x0A035D,        5163, 0x0A0660,
        5339, 0x0B0265,        1197, 0x0B0366,        5342, 0x0B0467,
        5172, 0x0B0669,        5173, 0x0C016D,        5177, 0x0C026E,
        5178, 0x0C0470,        1620, 0x0C0672,        4114, 0x0D0277,
        4248, 0x0D057A,        5174, 0x0D067B,        1631, 0x0D077C,
    14, /* 14-bit codes */
        11867, 0x020719,        8502,  0x030722,        8498,  0x030823,
        8499,  0x050734,        3255,  0x06083E,        8500,  0x08074F,
        2392,  0x0A0761,        10687, 0x0A0862,        11866, 0x0B086B,
        3254,  0x0C036F,        8501,  0x0C0773,        2393,  0x0D0479,
        8230,  0x0D087D,        8503,  0x0E007E,
    4, /* 15-bit codes */
        16462, 0x04072B,        16463, 0x080850,        21372, 0x0C0874,
        21373, 0x0D0378,
    -1 /* end of table */
};

//VC-1 Table 137:  2-Field reference interlace MV table 4
// Index    VLC       VLC   Index    VLC        VLC    Index   VLC        VLC
//        Codeword    Size          Codeword    Size           Codeword   Size
//    0        5        4    42        966       10     84        295      9
//    1        25       5    43        1935      11     85        141      9
//    2        22       5    44        63         6     86        539      10
//    3        17       5    45        166        8     87        1970     11
//    4        62       6    46        240        8     88        479      10
//    5        94       7    47        58         7     89        984      10
//    6        239      8    48        82         7     90        1892     12
//    7        226      8    49        78         7     91        3812     12
//    8        0        2    50        227        8     92        947      11
//    9        57       6    51        473        9     93        1869     11
//    10       43       6    52        783       10     94        472      10
//    11       38       6    53        16         6     95        1500     11
//    12       40       6    54        477        9     96        2122     12
//    13       18       6    55        167        8     97        1177     11
//    14       194      8    56        247        8     98        965      10
//    15       237      9    57        34         7     99        7566     13
//    16       285     10    58        146        8    100        1893     12
//    17       13       4    59        964       10    101        1077     11
//    18       49       6    60        751       10    102        1905     11
//    19       42       6    61        1890      11    103        450      10
//    20       37       6    62        121        7    104        280      10
//    21       32       6    63        143        9    105        956      11
//    22       92       7    64        474        9    106        897      11
//    23       493      9    65        135        8    107        903      11
//    24       589     10    66        232        8    108        31539    15
//    25       1904    11    67        186        8    109        4247     13
//    26       6        4    68        374        9    110        4246     13
//    27       122      7    69        238        9    111        7885     13
//    28       96       7    70        944       10    112        3737     12
//    29       79       7    71        133        8    113        3868     12
//    30       72       7    72        281       10    114        3869     12
//    31       57       7    73        782       10    115        3813     12
//    32       390      9    74        264        9    116        284      10
//    33       531     10    75        466        9    117        31538    15
//    34       3782    12    76        268        9    118        15768    14
//    35       15       5    77        1907      11    119        7567     13
//    36       38       7    78        1060      11    120        3736     12
//    37       95       7    79        1076      11    121        3943     12
//    38       117      7    80        113        8    122        957      11
//    39       112      7    81        1501      11    123        896      11
//    40       39       7    82        449       10    124        1176     11
//    41       475      9    83        935       10    125        902      11

//const extern Ipp32s VC1_Field2ReferenceInterlaceMVTable4[] =
const extern Ipp32s VC1_InterlacedMVDifTable4[] =
{
    15, /* max bits */
    3,  /* total subtables */
    5,5,5,

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        0, 0x010009,
    0, /* 3-bit codes */
    3, /* 4-bit codes */
        5,  0x000101,        13, 0x020012,        6,  0x03001B,
    4, /* 5-bit codes */
        25, 0x000202,        22, 0x000303,        17, 0x000404,
        15, 0x040024,
    12, /* 6-bit codes */
        62, 0x000505,        57, 0x01010A,        43, 0x01020B,
        38, 0x01030C,        40, 0x01040D,        18, 0x01050E,
        49, 0x020113,        42, 0x020214,        37, 0x020315,
        32, 0x020416,        63, 0x05002D,        16, 0x060036,
    17, /* 7-bit codes */
        94,  0x000606,        92,  0x020517,        122, 0x03011C,
        96,  0x03021D,        79,  0x03031E,        72,  0x03041F,
        57,  0x030520,        38,  0x040125,        95,  0x040226,
        117, 0x040327,        112, 0x040428,        39,  0x040529,
        58,  0x050330,        82,  0x050431,        78,  0x050532,
        34,  0x06043A,        121, 0x07003F,
    14, /* 8-bit codes */
        239, 0x000707,        226, 0x000808,        194, 0x01060F,
        166, 0x05012E,        240, 0x05022F,        227, 0x050633,
        167, 0x060238,        247, 0x060339,        146, 0x06053B,
        135, 0x070342,        232, 0x070443,        186, 0x070544,
        133, 0x080048,        113, 0x090051,
    15, /* 9-bit codes */
        237, 0x010710,        493, 0x020618,        390, 0x030621,
        475, 0x04062A,        473, 0x050734,        477, 0x060137,
        143, 0x070140,        474, 0x070241,        374, 0x070645,
        238, 0x070746,        264, 0x08034B,        466, 0x08044C,
        268, 0x08054D,        295, 0x090455,        141, 0x090556,
    20, /* 10-bit codes */
        285, 0x010811,        589, 0x020719,        531, 0x030722,
        966, 0x04072B,        783, 0x050835,        964, 0x06063C,
        751, 0x06073D,        944, 0x070847,        281, 0x080149,
        782, 0x08024A,        449, 0x090253,        935, 0x090354,
        539, 0x090657,        479, 0x090859,        984, 0x0A005A,
        472, 0x0A055F,        965, 0x0B0063,        450, 0x0B0568,
        280, 0x0B0669,        284, 0x0D0075,
    21, /* 11-bit codes */
        1904, 0x02081A,        1935, 0x04082C,        1890, 0x06083E,
        1907, 0x08064E,        1060, 0x08074F,        1076, 0x080850,
        1501, 0x090152,        1970, 0x090758,        947,  0x0A035D,
        1869, 0x0A045E,        1500, 0x0A0660,        1177, 0x0A0862,
        1077, 0x0B0366,        1905, 0x0B0467,        956,  0x0B076A,
        897,  0x0B086B,        903,  0x0C006C,        957,  0x0D067B,
        896,  0x0D077C,        1176, 0x0D087D,        902,  0x0E007E,
    11, /* 12-bit codes */
        3782, 0x030823,        1892, 0x0A015B,        3812, 0x0A025C,
        2122, 0x0A0761,        1893, 0x0B0265,        3737, 0x0C0571,
        3868, 0x0C0672,        3869, 0x0C0773,        3813, 0x0C0874,
        3736, 0x0D0479,        3943, 0x0D057A,
    5, /* 13-bit codes */
        7566, 0x0B0164,        4247, 0x0C026E,        4246, 0x0C036F,
        7885, 0x0C0470,        7567, 0x0D0378,
    1, /* 14-bit codes */
        15768, 0x0D0277,
    2, /* 15-bit codes */
        31539, 0x0C016D,        31538, 0x0D0176,
    -1 /* end of table */
};

//VC-1 Table 138:  2-Field reference interlace MV table 5
// Index    VLC       VLC      Index    VLC       VLC    Index    VLC       VLC
//        Codeword    Size            Codeword    Size          Codeword    Size
//   0        13        4        42     1887        11    84        363      9
//   1        16        5        43     3153        12    85        957      10
//   2        46        6        44       21         5    86        705      10
//   3        57        6        45       71         7    87        1580     11
//   4        13        6        46      238         8    88        7678     13
//   5       116        7        47      226         8    89        14       7
//   6       237        8        48      234         8    90        1438     11
//   7       182        8        49        9         8    91        1471     11
//   8         1        2        50      362         9    92        218      11
//   9         2        4        51      707        10    93        1577     11
//   10        0        5        52     1437        11    94        1412     11
//   11       48        6        53       61         6    95        3767     12
//   12       41        6        54        8         8    96        2826     12
//   13      112        7        55      473         9    97        1645     13
//   14      243        8        56       50         8    98        12       7
//   15      140        8        57       14         8    99        1918     11
//   16      358        9        58      366         9   100        1436     11
//   17        9        4        59      812        10   101        1912     11
//   18       51        6        60     1627        11   102        1886     11
//   19      120        7        61     6507        13   103        1882     11
//   20        6        7        62        2         5   104        1581     11
//   21      196        8        63       15         8   105        823      12
//   22       11        8        64      472         9   106        820      12
//   23      355        9        65      141         8   107        407      9
//   24      204       10        66      180         8   108        7767     13
//   25     1470       11        67      484         9   109        7652     13
//   26       31        5        68      103         9   110        6506     13
//   27       47        6        69      791        10   111        7766     13
//   28      100        7        70     1940        11   112        3152     12
//   29       24        7        71       34         6   113        2879     12
//   30      198        8        72      958        10   114        7764     13
//   31       10        8        73      789        10   115        2827     12
//   32      354        9        74       52         9   116        398      9
//   33      704       10        75       55         9   117        438      12
//   34     3827       12        76      734        10   118        7765     13
//   35        7        5        77      108        10   119        3252     12
//   36       15        7        78     3838        12   120        2878     12
//   37      227        8        79     1644        13   121        3766     12
//   38      202        8        80       40         6   122        7653     13
//   39      178        8        81      971        10   123        7679     13
//   40      399        9        82      940        10   124        821      12
//   41      942       10        83       53         9   125        439      12


//const extern Ipp32s VC1_Field2ReferenceInterlaceMVTable5[] =
const extern Ipp32s VC1_InterlacedMVDifTable5[] =
{
    13, /* max bits */
    2,  /* total subtables */
    6,7,

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        1, 0x010009,
    0, /* 3-bit codes */
    3, /* 4-bit codes */
        13, 0x000101,        2,  0x01010A,        9,  0x020012,
    6, /* 5-bit codes */
        16, 0x000202,        0,  0x01020B,        31, 0x03001B,
        7,  0x040024,        21, 0x05002D,        2,  0x07003F,
    10, /* 6-bit codes */
        46, 0x000303,        57, 0x000404,        13, 0x000505,
        48, 0x01030C,        41, 0x01040D,        51, 0x020113,
        47, 0x03011C,        61, 0x060036,        34, 0x080048,
        40, 0x090051,
    10, /* 7-bit codes */
        116, 0x000606,        112, 0x01050E,        120, 0x020214,
        6,   0x020315,        100, 0x03021D,        24,  0x03031E,
        15,  0x040125,        71,  0x05012E,        14,  0x0A005A,
        12,  0x0B0063,
    21, /* 8-bit codes */
        237, 0x000707,        182, 0x000808,        243, 0x01060F,
        140, 0x010710,        196, 0x020416,        11,  0x020517,
        198, 0x03041F,        10,  0x030520,        227, 0x040226,
        202, 0x040327,        178, 0x040428,        238, 0x05022F,
        226, 0x050330,        234, 0x050431,        9,   0x050532,
        8,   0x060137,        50,  0x060339,        14,  0x06043A,
        15,  0x070140,        141, 0x070342,        180, 0x070443,
    16, /* 9-bit codes */
        358, 0x010811,        355, 0x020618,        354, 0x030621,
        399, 0x040529,        362, 0x050633,        473, 0x060238,
        366, 0x06053B,        472, 0x070241,        484, 0x070544,
        103, 0x070645,        52,  0x08034B,        55,  0x08044C,
        53,  0x090354,        363, 0x090455,        407, 0x0C006C,
        398, 0x0D0075,
    14, /* 10-bit codes */
        204, 0x020719,        704, 0x030722,        942, 0x04062A,
        707, 0x050734,        812, 0x06063C,        791, 0x070746,
        958, 0x080149,        789, 0x08024A,        734, 0x08054D,
        108, 0x08064E,        971, 0x090152,        940, 0x090253,
        957, 0x090556,        705, 0x090657,
    17, /* 11-bit codes */
        1470, 0x02081A,        1887, 0x04072B,        1437, 0x050835,
        1627, 0x06073D,        1940, 0x070847,        1580, 0x090758,
        1438, 0x0A015B,        1471, 0x0A025C,        218,  0x0A035D,
        1577, 0x0A045E,        1412, 0x0A055F,        1918, 0x0B0164,
        1436, 0x0B0265,        1912, 0x0B0366,        1886, 0x0B0467,
        1882, 0x0B0568,        1581, 0x0B0669,
    16, /* 12-bit codes */
        3827, 0x030823,        3153, 0x04082C,        3838, 0x08074F,
        3767, 0x0A0660,        2826, 0x0A0761,        823,  0x0B076A,
        820,  0x0B086B,        3152, 0x0C0571,        2879, 0x0C0672,
        2827, 0x0C0874,        438,  0x0D0176,        3252, 0x0D0378,
        2878, 0x0D0479,        3766, 0x0D057A,        821,  0x0D087D,
        439,  0x0E007E,
    12, /* 13-bit codes */
        6507, 0x06083E,        1644, 0x080850,        7678, 0x090859,
        1645, 0x0A0862,        7767, 0x0C016D,        7652, 0x0C026E,
        6506, 0x0C036F,        7766, 0x0C0470,        7764, 0x0C0773,
        7765, 0x0D0277,        7653, 0x0D067B,        7679, 0x0D077C,
    -1 /* end of table */
};

//VC-1 Table 139:  2-Field reference interlace MV table 6
// Index    VLC      VLC     Index    VLC      VLC    Index    VLC        VLC
//         Codeword  Size            Codeword  Size           Codeword    Size
//    0        1        3     42      717       13     84        346       12
//    1       11        5     43      1037585   21     85        359       12
//    2       25        6     44      20         6     86        3531      13
//    3      111        8     45      173        9     87        1413      14
//    4       42        9     46      170        9     88        1037591   21
//    5      117       10     47      20         8     89        1015      11
//    6     2027       12     48      168        9     90        16213     15
//    7      355       12     49      339       10     91        1037592   21
//    8        1        1     50      232       11     92        3548      13
//    9       14        5     51      510       12     93        1414      14
//    10      26        6     52      3535      13     94        16214     15
//    11      62        7     53      120        8     95        1037593   21
//    12      28        8     54      440       10     96        16215     15
//    13      45        9     55      338       10     97        1037594   21
//    14     356       12     56      254       11     98        442       10
//    15    2028       12     57      689       11     99        1415      14
//    16     357       12     58      349       12     100        1416     14
//    17       4        4     59      352       12     101        3551     13
//    18       6        6     60      1037586   21     102        690      13
//    19      54        7     61      1037587   21     103        1037595  21
//    20     127        8     62      122        8     104        3534     13
//    21     174        9     63      688       11     105        1014     13
//    22     344       12     64      485       10     106        1037596  21
//    23     348       12     65      233       11     107        4052     13
//    24    1389       14     66      252       11     108        1037597  21
//    25 1037584       21     67      1766      12     109        1037598  21
//    26       0        4     68      3528      13     110        1037599  21
//    27       4        6     69      1412      14     111        518784   20
//    28     123        8     70      1037588   21     112        518785   20
//    29     243        9     71      171        9     113        1388     14
//    30      59        9     72      3550      13     114        518786   20
//    31    2029       12     73      345       10     115        518787   20
//    32     691       13     74      1012      11     116        886      11
//    33     716       13     75      3529      13     117        1417     14
//    34    1390       14     76      3530      13     118        1418     14
//    35      24        6     77      506       12     119        518788   20
//    36      62        9     78      1037589   21     120        518789   20
//    37      23        8     79      1037590   21     121        3549     13
//    38      30        8     80      252        9     122        518790   20
//    39     175        9     81      511       12     123        518791   20
//    40    1015       13     82      484       10     124        1419     14
//    41    1391       14     83      175       11     125        32425    16

//const extern Ipp32s VC1_Field2ReferenceInterlaceMVTable6[] =
const extern Ipp32s VC1_InterlacedMVDifTable6[] =
{
    21, /* max bits */
    3,  /* total subtables */
    7,7,7,

    1, /* 1-bit codes */
        1, 0x010009,
    0, /* 2-bit codes */
    1, /* 3-bit codes */
        1, 0x000101,
    2, /* 4-bit codes */
        4, 0x020012,        0, 0x03001B,
    2, /* 5-bit codes */
        11, 0x000202,        14, 0x01010A,
    6, /* 6-bit codes */
        25, 0x000303,        26, 0x01020B,        6,  0x020113,
        4,  0x03011C,        24, 0x040024,        20, 0x05002D,
    2, /* 7-bit codes */
        62, 0x01030C,        54, 0x020214,
    9, /* 8-bit codes */
        111, 0x000404,        28,  0x01040D,        127, 0x020315,
        123, 0x03021D,        23,  0x040226,        30,  0x040327,
        20,  0x050330,        120, 0x060036,        122, 0x07003F,
    12, /* 9-bit codes */
        42,  0x000505,        45,  0x01050E,        174, 0x020416,
        243, 0x03031E,        59,  0x03041F,        62,  0x040125,
        175, 0x040428,        173, 0x05012E,        170, 0x05022F,
        168, 0x050431,        171, 0x080048,        252, 0x090051,
    8, /* 10-bit codes */
        117, 0x000606,        339, 0x050532,        440, 0x060137,
        338, 0x060238,        485, 0x070241,        345, 0x08024A,
        484, 0x090253,        442, 0x0B0063,
    10, /* 11-bit codes */
        232,  0x050633,        254,  0x060339,        689,  0x06043A,
        688,  0x070140,        233,  0x070342,        252,  0x070443,
        1012, 0x08034B,        175,  0x090354,        1015, 0x0A005A,
        886,  0x0D0075,
    16, /* 12-bit codes */
        2027, 0x000707,        355,  0x000808,        356,  0x01060F,
        2028, 0x010710,        357,  0x010811,        344,  0x020517,
        348,  0x020618,        2029, 0x030520,        510,  0x050734,
        349,  0x06053B,        352,  0x06063C,        1766, 0x070544,
        506,  0x08064E,        511,  0x090152,        346,  0x090455,
        359,  0x090556,
    17, /* 13-bit codes */
        691,  0x030621,        716,  0x030722,        1015, 0x040529,
        717,  0x04072B,        3535, 0x050835,        3528, 0x070645,
        3550, 0x080149,        3529, 0x08044C,        3530, 0x08054D,
        3531, 0x090657,        3548, 0x0A035D,        3551, 0x0B0366,
        690,  0x0B0467,        3534, 0x0B0669,        1014, 0x0B076A,
        4052, 0x0C006C,        3549, 0x0D057A,
    12, /* 14-bit codes */
        1389, 0x020719,        1390, 0x030823,        1391, 0x04062A,
        1412, 0x070746,        1413, 0x090758,        1414, 0x0A045E,
        1415, 0x0B0164,        1416, 0x0B0265,        1388, 0x0C0672,
        1417, 0x0D0176,        1418, 0x0D0277,        1419, 0x0D087D,
    3, /* 15-bit codes */
        16213, 0x0A015B,        16214, 0x0A055F,        16215, 0x0A0761,
    1, /* 16-bit codes */
        32425, 0x0E007E,
    0, /* 17-bit codes */
    0, /* 18-bit codes */
    0, /* 19-bit codes */
    8, /* 20-bit codes */
        518784, 0x0C0470,        518785, 0x0C0571,        518786, 0x0C0773,
        518787, 0x0C0874,        518788, 0x0D0378,        518789, 0x0D0479,
        518790, 0x0D067B,        518791, 0x0D077C,
    16, /* 21-bit codes */
        1037584, 0x02081A,        1037585, 0x04082C,        1037586, 0x06073D,
        1037587, 0x06083E,        1037588, 0x070847,        1037589, 0x08074F,
        1037590, 0x080850,        1037591, 0x090859,        1037592, 0x0A025C,
        1037593, 0x0A0660,        1037594, 0x0A0862,        1037595, 0x0B0568,
        1037596, 0x0B086B,        1037597, 0x0C016D,        1037598, 0x0C026E,
        1037599, 0x0C036F,
-1 /* end of table */
};

//VC-1 Table 140:  2-Field reference interlace MV table 7
// Index   VLC        VLC  Index    VLC      VLC     Index    VLC        VLC
//        Codeword    Size        Codeword   Size           Codeword    Size
//    0        3       2    42      25902    16        84      1608      12
//    1       14       5    43      214727   20        85      1602      12
//    2       15       6    44      62        7        86      3206      13
//    3      126       8    45      57        8        87      3212      13
//    4       98       9    46      53        8        88      214732    20
//    5      198      10    47      51        8        89      58        10
//    6     3289      13    48      415      10        90      6583      14
//    7     1598      13    49      448      11        91      67        11
//    8        2       2    50      3290     13        92      807       11
//    9        2       4    51      214728   20        93      140       12
//    10       0       5    52      214729   20        94      141       12
//    11      24       6    53      11        8        95      3213      13
//    12      12       8    54      208      10        96      214733    20
//    13     105       9    55      414      10        97      214734    20
//    14      57      10    56      34       10        98      823       11
//    15    1799      13    57      56       10        99      3301      13
//    16    3198      14    58      398      11        100     133       12
//    17       2       3    59      798      12        101     806       11
//    18      13       5    60      12948    15        102     839       12
//    19      27       7    61      572      14        103     3236      13
//    20      15       8    62      50        8        104     3199      14
//    21     410      10    63      18        9        105     3354      14
//    22    1607      12    64      19        9        106     214735    20
//    23    6711      15    65      113       9        107     808       11
//    24  214724      20    66      413      10        108     107360    19
//    25   13421      16    67      32       10        109     107361    19
//    26       1       4    68      3207     13        110     3288      13
//    27      30       6    69      3264     13        111     1676      13
//    28     127       8    70      214730   20        112     12949     15
//    29      10       8    71      824      11        113     12950     15
//    30     225      10    72      1619     12        114     25903     16
//    31    1633      12    73      418      11        115     26328     16
//    32    3300      13    74      810      11        116     817       11
//    33  214725      20    75      802      11        117     1798      13
//    34  214726      20    76      3303     13        118     573       14
//    35      29       7    77      132      12        119     118       11
//    36      48       8    78      287      13        120     3265      13
//    37      13       8    79      214731   20        121     898       12
//    38     203       9    80      805      11        122     3302      13
//    39     409      10    81      1609     12        123     26329     16
//    40     800      11    82      811      11        124     26330     16
//    41     142      12    83      119      11        125     26331     16

//const extern Ipp32s VC1_Field2ReferenceInterlaceMVTable7[] =
const extern Ipp32s VC1_InterlacedMVDifTable7[] =
{
    20, /* max bits */
    3,  /* total subtables */
    7,7,6,

    0, /* 1-bit codes */
    2, /* 2-bit codes */
        3, 0x000101,        2, 0x010009,
    1, /* 3-bit codes */
        2, 0x020012,
    2, /* 4-bit codes */
        2, 0x01010A,        1, 0x03001B,
    3, /* 5-bit codes */
        14, 0x000202,        0,  0x01020B,        13, 0x020113,
    3, /* 6-bit codes */
        15, 0x000303,        24, 0x01030C,        30, 0x03011C,
    3, /* 7-bit codes */
        27, 0x020214,        29, 0x040024,        62, 0x05002D,
    12, /* 8-bit codes */
        126, 0x000404,        12,  0x01040D,        15,  0x020315,
        127, 0x03021D,        10,  0x03031E,        48,  0x040125,
        13,  0x040226,        57,  0x05012E,        53,  0x05022F,
        51,  0x050330,        11,  0x060036,        50,  0x07003F,
    6, /* 9-bit codes */
        98,  0x000505,        105, 0x01050E,        203, 0x040327,
        18,  0x070140,        19,  0x070241,        113, 0x070342,
    13, /* 10-bit codes */
        198, 0x000606,        57,  0x01060F,        410, 0x020416,
        225, 0x03041F,        409, 0x040428,        415, 0x050431,
        208, 0x060137,        414, 0x060238,        34,  0x060339,
        56,  0x06043A,        413, 0x070443,        32,  0x070544,
        58,  0x0A005A,
    17, /* 11-bit codes */
        800, 0x040529,        448, 0x050532,        398, 0x06053B,
        824, 0x080048,        418, 0x08024A,        810, 0x08034B,
        802, 0x08044C,        805, 0x090051,        811, 0x090253,
        119, 0x090354,        67,  0x0A025C,        807, 0x0A035D,
        823, 0x0B0063,        806, 0x0B0366,        808, 0x0C006C,
        817, 0x0D0075,        118, 0x0D0378,
    14, /* 12-bit codes */
        1607, 0x020517,        1633, 0x030520,        142,  0x04062A,
        798,  0x06063C,        1619, 0x080149,        132,  0x08064E,
        1609, 0x090152,        1608, 0x090455,        1602, 0x090556,
        140,  0x0A045E,        141,  0x0A055F,        133,  0x0B0265,
        839,  0x0B0467,        898,  0x0D057A,
    19, /* 13-bit codes */
        3289, 0x000707,        1598, 0x000808,        1799, 0x010710,
        3300, 0x030621,        3290, 0x050633,        3207, 0x070645,
        3264, 0x070746,        3303, 0x08054D,        287,  0x08074F,
        3206, 0x090657,        3212, 0x090758,        3213, 0x0A0660,
        3301, 0x0B0164,        3236, 0x0B0568,        3288, 0x0C036F,
        1676, 0x0C0470,        1798, 0x0D0176,        3265, 0x0D0479,
        3302, 0x0D067B,
    6, /* 14-bit codes */
        3198, 0x010811,        572,  0x06083E,        6583, 0x0A015B,
        3199, 0x0B0669,        3354, 0x0B076A,        573,  0x0D0277,
    4, /* 15-bit codes */
        6711,  0x020618,        12948, 0x06073D,        12949, 0x0C0571,
        12950, 0x0C0672,
    7, /* 16-bit codes */
        13421, 0x02081A,        25902, 0x04072B,        25903, 0x0C0773,
        26328, 0x0C0874,        26329, 0x0D077C,        26330, 0x0D087D,
        26331, 0x0E007E,
    0, /* 17-bit codes */
    0, /* 18-bit codes */
    2, /* 19-bit codes */
        107360, 0x0C016D,        107361, 0x0C026E,
    12, /* 20-bit codes */
        214724, 0x020719,        214725, 0x030722,        214726, 0x030823,
        214727, 0x04082C,        214728, 0x050734,        214729, 0x050835,
        214730, 0x070847,        214731, 0x080850,        214732, 0x090859,
        214733, 0x0A0761,        214734, 0x0A0862,        214735, 0x0B086B,
-1 /* end of table */
};

//VC-1 Table 141:  1-Field reference interlace MV table 0
// Index    VLC       VLC    Index    VLC       VLC    Index   VLC        VLC
//        Codeword    Size           Codeword   Size           Codeword   Size
//    0     5          3      24        502      9        48     105        8
//    1    12          4      25        500      9        49     506        9
//    2    30          5      26        57       6        50     479        9
//    3    18          5      27        127      8        51     503        9
//    4    12          5      28        39       7        52     112        8
//    5    52          6      29        106      7        53     477        9
//    6   117          7      30        113      7        54     3661       13
//    7   112          7      31        53       7        55     1831       12
//    8     0          2      32        113      8        56     914        11
//    9     8          4      33        104      8        57     456        10
//    10   27          5      34        476      9        58     459        10
//    11    8          5      35        39       6        59     1016       10
//    12   29          6      36        115      8        60     430        9
//    13  124          7      37        255      8        61     504        9
//    14  214          8      38        232      8        62     507        9
//    15  478          9      39        233      8        63     58574      17
//    16  431          9      40        126      8        64     58575      17
//    17    5          4      41        505      9        65     29280      16
//    18   27          6      42        501      9        66     29281      16
//    19   38          6      43        509      9        67     29282      16
//    20   30          6      44        62       7        68     29283      16
//    21   18          6      45        458     10        69     29284      16
//    22  118          7      46        1017    10        70     29285      16
//    23   77          8      47        76       8        71     29286      16

//const extern Ipp32s VC1_Field1ReferenceInterlaceMVTable0[] =
const extern Ipp32s VC1_InterlacedMVDifTable8[] =
{
    17, /* max bits */
    3,  /* total subtables */
    5,6,6,

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        0,  0x010009,
    1, /* 3-bit codes */
        5,  0x000101,
    3, /* 4-bit codes */
        12,  0x000202,        8,   0x01010A,        5,   0x020012,
    5, /* 5-bit codes */
        30,  0x000303,        18,  0x000404,        12,  0x000505,
        27,  0x01020B,        8,   0x01030C,
    8, /* 6-bit codes */
        52,  0x000606,        29,  0x01040D,        27,  0x020113,
        38,  0x020214,        30,  0x020315,        18,  0x020416,
        57,  0x03001B,        39,  0x040024,
    9, /* 7-bit codes */
        117,  0x000707,        112,  0x000808,        124,  0x01050E,
        118,  0x020517,        39,   0x03021D,        106,  0x03031E,
        113,  0x03041F,        53,   0x030520,        62,   0x05002D,
    13, /* 8-bit codes */
        214,  0x01060F,        77,   0x020618,        127,  0x03011C,
        113,  0x030621,        104,  0x030722,        115,  0x040125,
        255,  0x040226,        232,  0x040327,        233,  0x040428,
        126,  0x040529,        76,   0x050330,        105,  0x050431,
        112,  0x050835,
    15, /* 9-bit codes */
        478,  0x010710,        431,  0x010811,        502,  0x020719,
        500,  0x02081A,        476,  0x030823,        505,  0x04062A,
        501,  0x04072B,        509,  0x04082C,        506,  0x050532,
        479,  0x050633,        503,  0x050734,        477,  0x060036,
        430,  0x06073D,        504,  0x06083E,        507,  0x07003F,
    5, /* 10-bit codes */
        458,   0x05012E,        1017,  0x05022F,        456,   0x06043A,
        459,   0x06053B,        1016,  0x06063C,
    1, /* 11-bit codes */
        914,  0x060339,
    1, /* 12-bit codes */
        1831,  0x060238,
    1, /* 13-bit codes */
        3661,  0x060137,
    0, /* 14-bit codes */
    0, /* 15-bit codes */
    7, /* 16-bit codes */
        29280,  0x070342,        29281,  0x070443,        29282,  0x070544,
        29283,  0x070645,        29284,  0x070746,        29285,  0x070847,
        29286,  0x080048,
    2, /* 17-bit codes */
        58574,  0x070140,        58575,  0x070241,
-1 /* end of table */
};

//VC-1 Table 142:  1-Field reference interlace MV table 1
// Index    VLC     VLC    Index    VLC        VLC    Index    VLC        VLC
//        Codeword Size            Codeword    Size           Codeword    Size
//    0     7       3        24      181        9        48       361      10
//    1     1       3        25      206       11        49       84       10
//    2     7       4        26        6        4        50       1147     11
//    3    22       5        27       68        7        51       415      12
//    4     1       5        28       15        7        52       11133    14
//    5    69       7        29       70        7        53       142      8
//    6    24       8        30       14        7        54       2782     12
//    7   694      10        31      172        8        55       1145     11
//    8     6       3        32       50        9        56       1390     11
//    9     4       4        33       55        9        57       2292     12
//    10   23       5        34     4587       13        58       5567     13
//    11   16       5        35       10        5        59       1144     11
//    12   41       6        36       26        8        60       9172     14
//    13   44       7        37      287        9        61       44529    16
//    14  346       9        38       22        8        62       22265    15
//    15  102      10        39       20        8        63       712462   20
//    16  414      12        40       43        9        64       712463   20
//    17    9       4        41      360       10        65       356224   19
//    18   40       6        42       85       10        66       356225   19
//    19   23       6        43     9173       14        67       356226   19
//    20    0       5        44       87        7        68       356227   19
//    21   42       6        45       47        9        69       356228   19
//    22    4       6        46       54        9        70       356229   19
//    23   91       8        47       46        9        71       356230   19

//const extern Ipp32s VC1_Field1ReferenceInterlaceMVTable1[] =
const extern Ipp32s VC1_InterlacedMVDifTable9[] =
{
    20, /* max bits */
    3,  /* total subtables */
    6,7,7,

    0, /* 1-bit codes */
    0, /* 2-bit codes */
    3, /* 3-bit codes */
        7, 0x000101,        1, 0x000202,        6, 0x010009,
    4, /* 4-bit codes */
        7, 0x000303,        4, 0x01010A,        9, 0x020012,
        6, 0x03001B,
    6, /* 5-bit codes */
        22, 0x000404,        1,  0x000505,        23, 0x01020B,
        16, 0x01030C,        0,  0x020315,        10, 0x040024,
    5, /* 6-bit codes */
        41, 0x01040D,        40, 0x020113,        23, 0x020214,
        42, 0x020416,        4,  0x020517,
    7, /* 7-bit codes */
        69, 0x000606,        44, 0x01050E,        68, 0x03011C,
        15, 0x03021D,        70, 0x03031E,        14, 0x03041F,
        87, 0x05002D,
    7, /* 8-bit codes */
        24,  0x000707,        91,  0x020618,        172, 0x030520,
        26,  0x040125,        22,  0x040327,        20,  0x040428,
        142, 0x060036,
    9, /* 9-bit codes */
        346, 0x01060F,        181, 0x020719,        50,  0x030621,
        55,  0x030722,        287, 0x040226,        43,  0x040529,
        47,  0x05012E,        54,  0x05022F,        46,  0x050330,
    6, /* 10-bit codes */
        694, 0x000808,        102, 0x010710,        360, 0x04062A,
        85,  0x04072B,        361, 0x050431,        84,  0x050532,
    5, /* 11-bit codes */
        206,  0x02081A,        1147, 0x050633,        1145, 0x060238,
        1390, 0x060339,        1144, 0x06063C,
    4, /* 12-bit codes */
        414,  0x010811,        415,  0x050734,        2782, 0x060137,
        2292, 0x06043A,
    2, /* 13-bit codes */
        4587, 0x030823,        5567, 0x06053B,
    3, /* 14-bit codes */
        9173,  0x04082C,        11133, 0x050835,        9172,  0x06073D,
    1, /* 15-bit codes */
        22265, 0x07003F,
    1, /* 16-bit codes */
        44529, 0x06083E,
    0, /* 17-bit codes */
    0, /* 18-bit codes */
    7, /* 19-bit codes */
        356224, 0x070342,        356225, 0x070443,        356226, 0x070544,
        356227, 0x070645,        356228, 0x070746,        356229, 0x070847,
        356230, 0x080048,
    2, /* 20-bit codes */
        712462, 0x070140,        712463, 0x070241,
    -1 /* end of table */
};

//VC-1 Table 143:  1-Field reference interlace MV table 2
// Index  VLC       VLC   Index   VLC         VLC     Index    VLC        VLC
//        Codeword  Size          Codeword    Size            Codeword    Size
//    0     2        3       24      51        8        48     1574        11
//    1     6        4       25      497       9        49     2037        11
//    2     7        4       26      2         5        50     3147        12
//    3    13        4       27      1019     10        51     8144        13
//    4     7        5       28      499       9        52     4173        15
//    5    48        6       29      34        8        53     101          9
//    6   255        8       30      508       9        54     3138        12
//    7   496        9       31      66        9        55     201         10
//    8     2        2       32      1571     11        56     1575        11
//    9     0        4       33      131      10        57     3139        12
//    10    5        5       34      1568     11        58     3146        12
//    11   25        5       35      125       7        59     4174        15
//    12   30        5       36      64        9        60     8145        13
//    13    7        6       37      67        9        61     4175        15
//    14   99        7       38      996      10        62     1042        13
//    15  253        8       39      997      10        63     66766       19
//    16   35        8       40      401      11        64     66767       19
//    17   14        4       41      4073     12        65     33376       18
//    18   27        7       42      261      11        66     33377       18
//    19   26        7       43      520      12        67     33378       18
//    20    6        6       44      252       8        68     33379       18
//    21    9        6       45      1572     11        69     33380       18
//    22   24        7       46      1570     11        70     33381       18
//    23  197        8       47      400      11        71     33382       18

//const extern Ipp32s VC1_Field1ReferenceInterlaceMVTable2[] =
const extern Ipp32s VC1_InterlacedMVDifTable10[] =
{
    19, /* max bits */
    3,  /* total subtables */
    6,6,7,

    0, /* 1-bit codes */
    1, /* 2-bit codes */
        2, 0x010009,
    1, /* 3-bit codes */
        2, 0x000101,
    5, /* 4-bit codes */
        6,  0x000202,        7,  0x000303,        13, 0x000404,
        0,  0x01010A,        14, 0x020012,
    5, /* 5-bit codes */
        7,  0x000505,        5,  0x01020B,        25, 0x01030C,
        30, 0x01040D,        2,  0x03001B,
    4, /* 6-bit codes */
        48, 0x000606,        7,  0x01050E,        6,  0x020315,
        9,  0x020416,
    5, /* 7-bit codes */
        99,  0x01060F,        27,  0x020113,        26,  0x020214,
        24,  0x020517,        125, 0x040024,
    7, /* 8-bit codes */
        255, 0x000707,        253, 0x010710,        35,  0x010811,
        197, 0x020618,        51,  0x020719,        34,  0x03031E,
        252, 0x05002D,
    8, /* 9-bit codes */
        496, 0x000808,
        497, 0x02081A,        499, 0x03021D,        508, 0x03041F,
        66,  0x030520,        64,  0x040125,        67,  0x040226,
        101, 0x060036,
    5, /* 10-bit codes */
        1019, 0x03011C,        131,  0x030722,        996,  0x040327,
        997,  0x040428,        201,  0x060238,
    10, /* 11-bit codes */
        1571, 0x030621,        1568, 0x030823,        401,  0x040529,
        261,  0x04072B,        1572, 0x05012E,        1570, 0x05022F,
        400,  0x050330,        1574, 0x050431,        2037, 0x050532,
        1575, 0x060339,
    6, /* 12-bit codes */
        4073, 0x04062A,        520,  0x04082C,        3147, 0x050633,
        3138, 0x060137,        3139, 0x06043A,        3146, 0x06053B,
    3, /* 13-bit codes */
        8144, 0x050734,        8145, 0x06073D,        1042, 0x07003F,
    0, /* 14-bit codes */
    3, /* 15-bit codes */
        4173, 0x050835,        4174, 0x06063C,        4175, 0x06083E,
    0, /* 16-bit codes */
    0, /* 17-bit codes */
    7, /* 18-bit codes */
        33376, 0x070342,        33377, 0x070443,        33378, 0x070544,
        33379, 0x070645,        33380, 0x070746,        33381, 0x070847,
        33382, 0x080048,
    2, /* 19-bit codes */
        66766, 0x070140,        66767, 0x070241,

-1 /* end of table */
};

//VC-1 Table 144:  1-Field reference interlace MV table 3
// Index  VLC      VLC   Index    VLC       VLC   Index    VLC       VLC
//       Codeword  Size          Codeword  Size          Codeword    Size
//    0     13      4      24      204       8      48      240        8
//    1      1      4      25      150       8      49      241        8
//    2      4      4      26      3         4      50      205        8
//    3      0      4      27      117       7      51      389        9
//    4     23      5      28      32        6      52      357       10
//    5      5      5      29      45        6      53      78         7
//    6    127      7      30      33        6      54      145        8
//    7     77      7      31      41        7      55      233        8
//    8      3      3      32      144       8      56      388        9
//    9     17      5      33      464       9      57      465        9
//    10    62      6      34      507       9      58      486        9
//    11    59      6      35      28        5      59      151        8
//    12    23      6      36      76        7      60      487        9
//    13   103      7      37      96        7      61      179        9
//    14    74      7      38      9         6      62      316        9
//    15   195      8      39      8         6      63      5710      14
//    16   242      8      40      45        7      64      5711      14
//    17    10      4      41      159       8      65      2848      13
//    18    44      6      42      506       9      66      2849      13
//    19    50      6      43      317       9      67      2850      13
//    20    61      6      44      49        6      68      2851      13
//    21    21      6      45      252       8      69      2852      13
//    22    40      7      46      88        8      70      2853      13
//    23   147      8      47      146       8      71      2854      13

//const extern Ipp32s VC1_Field1ReferenceInterlaceMVTable3[] =
const extern Ipp32s VC1_InterlacedMVDifTable11[] =
{
    14, /* max bits */
    2,  /* total subtables */
    7,7,

    0, /* 1-bit codes */
    0, /* 2-bit codes */
    1, /* 3-bit codes */
        3, 0x010009,
    6, /* 4-bit codes */
        13, 0x000101,        1,  0x000202,        4,  0x000303,
        0,  0x000404,        10, 0x020012,        3,  0x03001B,
    4, /* 5-bit codes */
        23, 0x000505,        5,  0x000606,        17, 0x01010A,
        28, 0x040024,
    13, /* 6-bit codes */
        62, 0x01020B,        59, 0x01030C,        23, 0x01040D,
        44, 0x020113,        50, 0x020214,        61, 0x020315,
        21, 0x020416,        32, 0x03021D,        45, 0x03031E,
        33, 0x03041F,        9,  0x040327,        8,  0x040428,
        49, 0x05002D,
    11, /* 7-bit codes */
        127, 0x000707,        77,  0x000808,        103, 0x01050E,
        74,  0x01060F,        40,  0x020517,        117, 0x03011C,
        41,  0x030520,        76,  0x040125,        96,  0x040226,
        45,  0x040529,        78,  0x060036,
    16, /* 8-bit codes */
        195, 0x010710,        242, 0x010811,        147, 0x020618,
        204, 0x020719,        150, 0x02081A,        144, 0x030621,
        159, 0x04062A,        252, 0x05012E,        88,  0x05022F,
        146, 0x050330,        240, 0x050431,        241, 0x050532,
        205, 0x050633,        145, 0x060137,        233, 0x060238,
        151, 0x06063C,
    11, /* 9-bit codes */
        464, 0x030722,        507, 0x030823,        506, 0x04072B,
        317, 0x04082C,        389, 0x050734,        388, 0x060339,
        465, 0x06043A,        486, 0x06053B,        487, 0x06073D,
        179, 0x06083E,        316, 0x07003F,
    1, /* 10-bit codes */
        357, 0x050835,
    0, /* 11-bit codes */
    0, /* 12-bit codes */
    7, /* 13-bit codes */
        2848, 0x070342,        2849, 0x070443,        2850, 0x070544,
        2851, 0x070645,        2852, 0x070746,        2853, 0x070847,
        2854, 0x080048,
    2, /* 14-bit codes */
        5710, 0x070140,        5711, 0x070241,
    -1 /* end of table */
};

//Table 113
const extern VC1PredictScaleValuesPPic VC1_PredictScaleValuesPPicTbl1[16] =
{
    {128,   512,    219,    32,    8,   37,   10},
    {192,   341,    236,    48,    12,  20,   5},
    {213,   307,    242,    53,    13,  14,   4},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3},
    {224,   293,    245,    56,    14,  11,   3}
};

//Table 113
const extern VC1PredictScaleValuesPPic VC1_PredictScaleValuesPPicTbl2[16] =
{
    {128,  512,     219,    32,    8,    37,   10},
    {64,   1024,    204,    16,    4,    52,   13},
    {43,   1536,    200,    11,    3,    56,   14},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15},
    {32,   2048,    198,    8,     2,    58,   15}
};

//Table 116
const extern VC1PredictScaleValuesBPic VC1_PredictScaleValuesBPicTbl1[16] =
{
    {171, 384, 230, 43, 11, 26, 7},
    {205, 320, 239, 51, 13, 17, 4},
    {219, 299, 244, 55, 14, 12, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
    {228, 288, 246, 57, 14, 10, 3},
};

#endif //UMC_ENABLE_VC1_VIDEO_DECODER
